import request from '@/utils/request'

export function getRooms(params) {
  return request({
    url: '/room/getRooms',
    method: 'get',
    params
  })
}

export function getRoomInfo(roomId) {
  return request({
    url: '/room/getRoomInfo',
    method: 'get',
    params: { roomId }
  })
}

export function addAdminToRoomer(
  adminAccount,
  roomId,
  createdName,
  templateId
) {
  return request({
    url: '/room/upRoomInfo',
    method: 'post',
    data: { adminAccount, roomId, createdName, templateId }
  })
}
export function updateRoomUserId(id, userId) {
  return request({
    url: '/room/updateRoomUserId',
    method: 'post',
    data: { id, userId }
  })
}
